import React, { Component, useEffect } from 'react';
import ReactDOM from 'react-dom';

export default function(props: any) {
  let el:HTMLDivElement =document.createElement('div');
  useEffect((): any => {
    let el = document.createElement('div');
    const body = document.querySelector('body');
    if (body) {
      
      
      return body.removeChild(el);
    }
  }, []);
  
  return ReactDOM.createPortal(props.children, el);
}


